<?php

class NbaPlayer{
	public $name;
	//修改clone关键字复制对象里面的值
	function __clone(){
		$this->name = 'TED';
	}
}
$james = new Nbaplayer();
$james->name = 'james';
echo $james->name.'<br/>';

//clone  复制一个对象给另外一个对象
$james2 = clone $james;
echo 'before set up:James\'s:'.$james2->name.'<br/>';
$james2->name = 'james2';
echo $james->name.'<br/>';
echo 'james2\'s'.$james2->name.'<br/>';
?>